<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
    <i-form>
        <el-table v-if="isDisplay === true"
            :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"  
            @sort-change="onSortChange($event)"  
            :border="isDragendCol"
            :highlight-current-row ="isSingleSelect"
            :row-class-name="getRowClassName.bind(_self)"
            :cell-class-name="getCellClassName.bind(_self)"
            size="mini"
            stripe
            :height="tableHeight"
            @row-click="rowClick($event)"  
            @select-all="selectAll($event)"  
            @select="select($event)"  
            @row-class-name="onRowClassName($event)"  
            @row-dblclick="rowDBLClick($event)"  
            ref='multipleTable' :data="items" :show-header="!isHideHeader"
        >
            <template slot="empty">
                {{$t('entities.hr_employee.master_grid.nodata')}} 
                <span class="quick-toolbar">
                </span>
            </template>
            <template v-if="!isSingleSelect">
                <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
            </template>
            <template v-if="getColumnState('name')">
                <el-table-column show-overflow-tooltip :prop="'name'" :label="$t('entities.hr_employee.master_grid.columns.name')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.name')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.name}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('job_id_text')">
                <el-table-column show-overflow-tooltip :prop="'job_id_text'" :label="$t('entities.hr_employee.master_grid.columns.job_id_text')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.job_id_text')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.job_id_text}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('address_id_text')">
                <el-table-column show-overflow-tooltip :prop="'address_id_text'" :label="$t('entities.hr_employee.master_grid.columns.address_id_text')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.address_id_text')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.address_id_text}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('work_email')">
                <el-table-column show-overflow-tooltip :prop="'work_email'" :label="$t('entities.hr_employee.master_grid.columns.work_email')" :width="200"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.work_email')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.work_email}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('mobile_phone')">
                <el-table-column show-overflow-tooltip :prop="'mobile_phone'" :label="$t('entities.hr_employee.master_grid.columns.mobile_phone')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.mobile_phone')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.mobile_phone}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('address_id')">
                <el-table-column show-overflow-tooltip :prop="'address_id'" :label="$t('entities.hr_employee.master_grid.columns.address_id')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.address_id')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.address_id}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('job_id')">
                <el-table-column show-overflow-tooltip :prop="'job_id'" :label="$t('entities.hr_employee.master_grid.columns.job_id')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.job_id')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.job_id}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('parent_id')">
                <el-table-column show-overflow-tooltip :prop="'parent_id'" :label="$t('entities.hr_employee.master_grid.columns.parent_id')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.parent_id')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.parent_id}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('parent_id_text')">
                <el-table-column show-overflow-tooltip :prop="'parent_id_text'" :label="$t('entities.hr_employee.master_grid.columns.parent_id_text')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.parent_id_text')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.parent_id_text}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('company_id')">
                <el-table-column show-overflow-tooltip :prop="'company_id'" :label="$t('entities.hr_employee.master_grid.columns.company_id')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.company_id')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.company_id}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('company_id_text')">
                <el-table-column show-overflow-tooltip :prop="'company_id_text'" :label="$t('entities.hr_employee.master_grid.columns.company_id_text')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.company_id_text')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.company_id_text}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('department_id')">
                <el-table-column show-overflow-tooltip :prop="'department_id'" :label="$t('entities.hr_employee.master_grid.columns.department_id')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.department_id')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.department_id}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('department_id_text')">
                <el-table-column show-overflow-tooltip :prop="'department_id_text'" :label="$t('entities.hr_employee.master_grid.columns.department_id_text')" :min-width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hr_employee.master_grid.columns.department_id_text')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.department_id_text}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="adaptiveState">
                <el-table-column></el-table-column>
            </template>
        </el-table>
        <row class='grid-pagination' v-show="items.length > 0">
            <page class='pull-right' @on-change="pageOnChange($event)" 
                @on-page-size-change="onPageSizeChange($event)"
                :total="totalRecord"
                show-sizer :current="curPage" :page-size="limit"
                :page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
                <span>
                    <span class="page-column">
                        <poptip transfer-class-name="grid-column" transfer placement="top-start">
                            <i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
                            <div slot="content">
                                <template v-for="col in allColumns">
                                    <div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
                                </template>
                            </div>
                        </poptip>
                    </span>
                    <span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
                    <span>
                        {{$t('app.gridpage.show')}}&nbsp;
                        <span>
                            <template v-if="items.length === 1">
                            1
                            </template>
                            <template v-else>
                                <span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
                            </template>
                        </span>&nbsp;
                        {{$t('app.gridpage.records')}}，{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
                    </span>
                </span>
            </page>
        </row>
    </i-form>
</div>